﻿using PMSWenLvTing.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

namespace PMSWenLvTing.Utility
{
    /// <summary>
    /// datarow转model
    /// </summary>
    public static  class RowToModelHelper
    {

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public static baobiao_fabu baobiao_fabuDataRowToModel(DataRow row)
		{
			baobiao_fabu model = new baobiao_fabu();
			if (row != null)
			{
				if (row["id"] != null && row["id"].ToString() != "")
				{
					model.id = long.Parse(row["id"].ToString());
				}
				if (row["bb_name"] != null)
				{
					model.bb_name = row["bb_name"].ToString();
				}
				if (row["leixing"] != null && row["leixing"].ToString() != "")
				{
					model.leixing = int.Parse(row["leixing"].ToString());
				}
				if (row["bb_riqi"] != null && row["bb_riqi"].ToString() != "")
				{
					model.bb_riqi = DateTime.Parse(row["bb_riqi"].ToString());
				}
				if (row["is_duanxin"] != null && row["is_duanxin"].ToString() != "")
				{
					if ((row["is_duanxin"].ToString() == "1") || (row["is_duanxin"].ToString().ToLower() == "true"))
					{
						model.is_duanxin = true;
					}
					else
					{
						model.is_duanxin = false;
					}
				}
				if (row["tianbao_kaishi"] != null && row["tianbao_kaishi"].ToString() != "")
				{
					model.tianbao_kaishi = DateTime.Parse(row["tianbao_kaishi"].ToString());
				}
				if (row["tianbao_jieshu"] != null && row["tianbao_jieshu"].ToString() != "")
				{
					model.tianbao_jieshu = DateTime.Parse(row["tianbao_jieshu"].ToString());
				}
				if (row["fabu_ren"] != null)
				{
					model.fabu_ren = row["fabu_ren"].ToString();
				}
				if (row["fabu_shijian"] != null && row["fabu_shijian"].ToString() != "")
				{
					model.fabu_shijian = DateTime.Parse(row["fabu_shijian"].ToString());
				}
				if (row["isdel"] != null && row["isdel"].ToString() != "")
				{
					if ((row["isdel"].ToString() == "1") || (row["isdel"].ToString().ToLower() == "true"))
					{
						model.isdel = true;
					}
					else
					{
						model.isdel = false;
					}
				}
				if (row["yywltid"] != null && row["yywltid"].ToString() != "")
				{
					model.yywltid = int.Parse(row["yywltid"].ToString());
				}
			}
			return model;
		}

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public static baobiao_zhuangtai baobiao_zhuangtaiDataRowToModel(DataRow row)
		{
			baobiao_zhuangtai model = new baobiao_zhuangtai();
			if (row != null)
			{
				if (row["id"] != null && row["id"].ToString() != "")
				{
					model.id = long.Parse(row["id"].ToString());
				}
				if (row["leixing"] != null && row["leixing"].ToString() != "")
				{
					model.leixing = int.Parse(row["leixing"].ToString());
				}
				if (row["bbid"] != null && row["bbid"].ToString() != "")
				{
					model.bbid = long.Parse(row["bbid"].ToString());
				}
				if (row["jdid"] != null && row["jdid"].ToString() != "")
				{
					model.jdid = int.Parse(row["jdid"].ToString());
				}
				if (row["zt_duanxin"] != null && row["zt_duanxin"].ToString() != "")
				{
					model.zt_duanxin = int.Parse(row["zt_duanxin"].ToString());
				}
				if (row["zt_shenhe"] != null && row["zt_shenhe"].ToString() != "")
				{
					model.zt_shenhe = int.Parse(row["zt_shenhe"].ToString());
				}
				if (row["zt_tianbao"] != null && row["zt_tianbao"].ToString() != "")
				{
					model.zt_tianbao = int.Parse(row["zt_tianbao"].ToString());
				}
				if (row["dt_duanxin"] != null && row["dt_duanxin"].ToString() != "")
				{
					model.dt_duanxin = DateTime.Parse(row["dt_duanxin"].ToString());
				}
				if (row["dt_shenhe"] != null && row["dt_shenhe"].ToString() != "")
				{
					model.dt_shenhe = DateTime.Parse(row["dt_shenhe"].ToString());
				}
				if (row["dt_tianbao"] != null && row["dt_tianbao"].ToString() != "")
				{
					model.dt_tianbao = DateTime.Parse(row["dt_tianbao"].ToString());
				}
				if (row["need_duanxin"] != null && row["need_duanxin"].ToString() != "")
				{
					if ((row["need_duanxin"].ToString() == "1") || (row["need_duanxin"].ToString().ToLower() == "true"))
					{
						model.need_duanxin = true;
					}
					else
					{
						model.need_duanxin = false;
					}
				}
				if (row["bb_riqi"] != null && row["bb_riqi"].ToString() != "")
				{
					model.bb_riqi = DateTime.Parse(row["bb_riqi"].ToString());
				}
				if (row["isdel"] != null && row["isdel"].ToString() != "")
				{
					if ((row["isdel"].ToString() == "1") || (row["isdel"].ToString().ToLower() == "true"))
					{
						model.isdel = true;
					}
					else
					{
						model.isdel = false;
					}
				}
				if (row["yyjdid"] != null && row["yyjdid"].ToString() != "")
				{
					model.yyjdid = int.Parse(row["yyjdid"].ToString());
				}
				if (row["yywltid"] != null && row["yywltid"].ToString() != "")
				{
					model.yywltid = int.Parse(row["yywltid"].ToString());
				}
				if (row["tianbao_kaishi"] != null && row["tianbao_kaishi"].ToString() != "")
				{
					model.tianbao_kaishi = DateTime.Parse(row["tianbao_kaishi"].ToString());
				}
				if (row["tianbao_jieshu"] != null && row["tianbao_jieshu"].ToString() != "")
				{
					model.tianbao_jieshu = DateTime.Parse(row["tianbao_jieshu"].ToString());
				}
			}
			return model;
		}

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public static jiudian jiudianDataRowToModel(DataRow row)
		{
			jiudian model = new jiudian();
			if (row != null)
			{
				if (row["id"] != null && row["id"].ToString() != "")
				{
					model.id = int.Parse(row["id"].ToString());
				}
				if (row["jd_name"] != null)
				{
					model.jd_name = row["jd_name"].ToString();
				}
				if (row["faren_danwei"] != null)
				{
					model.faren_danwei = row["faren_danwei"].ToString();
				}
				if (row["faren_name"] != null)
				{
					model.faren_name = row["faren_name"].ToString();
				}
				if (row["tongyi_xinyong_daima"] != null)
				{
					model.tongyi_xinyong_daima = row["tongyi_xinyong_daima"].ToString();
				}
				if (row["zhuce_dizhi"] != null)
				{
					model.zhuce_dizhi = row["zhuce_dizhi"].ToString();
				}
				if (row["zhuce_dizhi_youbian"] != null)
				{
					model.zhuce_dizhi_youbian = row["zhuce_dizhi_youbian"].ToString();
				}
				if (row["jingying_dizhi"] != null)
				{
					model.jingying_dizhi = row["jingying_dizhi"].ToString();
				}
				if (row["jingying_dizhi_youbian"] != null)
				{
					model.jingying_dizhi_youbian = row["jingying_dizhi_youbian"].ToString();
				}
				if (row["jingdu"] != null && row["jingdu"].ToString() != "")
				{
					model.jingdu = decimal.Parse(row["jingdu"].ToString());
				}
				if (row["weidu"] != null && row["weidu"].ToString() != "")
				{
					model.weidu = decimal.Parse(row["weidu"].ToString());
				}
				if (row["xingzheng_quhua"] != null)
				{
					model.xingzheng_quhua = row["xingzheng_quhua"].ToString();
				}
				if (row["has_tehang_xukezheng"] != null && row["has_tehang_xukezheng"].ToString() != "")
				{
					if ((row["has_tehang_xukezheng"].ToString() == "1") || (row["has_tehang_xukezheng"].ToString().ToLower() == "true"))
					{
						model.has_tehang_xukezheng = true;
					}
					else
					{
						model.has_tehang_xukezheng = false;
					}
				}
				if (row["has_zhian_xitong"] != null && row["has_zhian_xitong"].ToString() != "")
				{
					if ((row["has_zhian_xitong"].ToString() == "1") || (row["has_zhian_xitong"].ToString().ToLower() == "true"))
					{
						model.has_zhian_xitong = true;
					}
					else
					{
						model.has_zhian_xitong = false;
					}
				}
				if (row["tehangzheng_bianhao"] != null)
				{
					model.tehangzheng_bianhao = row["tehangzheng_bianhao"].ToString();
				}
				if (row["beian_xuliehao"] != null)
				{
					model.beian_xuliehao = row["beian_xuliehao"].ToString();
				}
				if (row["jingying_zhuangtai"] != null)
				{
					model.jingying_zhuangtai = row["jingying_zhuangtai"].ToString();
				}
				if (row["zhuce_leixing"] != null)
				{
					model.zhuce_leixing = row["zhuce_leixing"].ToString();
				}
				if (row["jianzhu_leixing_huafen"] != null)
				{
					model.jianzhu_leixing_huafen = row["jianzhu_leixing_huafen"].ToString();
				}
				if (row["keren_leixing_huafen"] != null)
				{
					model.keren_leixing_huafen = row["keren_leixing_huafen"].ToString();
				}
				if (row["quwei_leixing_huafen"] != null)
				{
					model.quwei_leixing_huafen = row["quwei_leixing_huafen"].ToString();
				}
				if (row["jiage_leixing_huafen"] != null)
				{
					model.jiage_leixing_huafen = row["jiage_leixing_huafen"].ToString();
				}
				if (row["jingying_leixing_huafen"] != null)
				{
					model.jingying_leixing_huafen = row["jingying_leixing_huafen"].ToString();
				}
				if (row["fangshu_leixing_huafen"] != null)
				{
					model.fangshu_leixing_huafen = row["fangshu_leixing_huafen"].ToString();
				}
				if (row["pinpai_leixing_huafen"] != null)
				{
					model.pinpai_leixing_huafen = row["pinpai_leixing_huafen"].ToString();
				}
				if (row["xingji_leixing_huafen"] != null)
				{
					model.xingji_leixing_huafen = row["xingji_leixing_huafen"].ToString();
				}
				if (row["minsu_pingji_dengji"] != null)
				{
					model.minsu_pingji_dengji = row["minsu_pingji_dengji"].ToString();
				}
				if (row["zhuangxiu_zaojia"] != null)
				{
					model.zhuangxiu_zaojia = row["zhuangxiu_zaojia"].ToString();
				}
				if (row["is_xingji"] != null && row["is_xingji"].ToString() != "")
				{
					if ((row["is_xingji"].ToString() == "1") || (row["is_xingji"].ToString().ToLower() == "true"))
					{
						model.is_xingji = true;
					}
					else
					{
						model.is_xingji = false;
					}
				}
				if (row["pingxing_riqi"] != null && row["pingxing_riqi"].ToString() != "")
				{
					model.pingxing_riqi = DateTime.Parse(row["pingxing_riqi"].ToString());
				}
				if (row["xingji_jianshe_biaozhun"] != null)
				{
					model.xingji_jianshe_biaozhun = row["xingji_jianshe_biaozhun"].ToString();
				}
				if (row["kaiye_riqi"] != null && row["kaiye_riqi"].ToString() != "")
				{
					model.kaiye_riqi = DateTime.Parse(row["kaiye_riqi"].ToString());
				}
				if (row["is_pinpai"] != null && row["is_pinpai"].ToString() != "")
				{
					if ((row["is_pinpai"].ToString() == "1") || (row["is_pinpai"].ToString().ToLower() == "true"))
					{
						model.is_pinpai = true;
					}
					else
					{
						model.is_pinpai = false;
					}
				}
				if (row["suoshu_pinpai"] != null)
				{
					model.suoshu_pinpai = row["suoshu_pinpai"].ToString();
				}
				if (row["suoshu_pinpai_jituan"] != null)
				{
					model.suoshu_pinpai_jituan = row["suoshu_pinpai_jituan"].ToString();
				}
				if (row["suoshu_pinpai_guojia"] != null)
				{
					model.suoshu_pinpai_guojia = row["suoshu_pinpai_guojia"].ToString();
				}
				if (row["is_liansuo"] != null && row["is_liansuo"].ToString() != "")
				{
					if ((row["is_liansuo"].ToString() == "1") || (row["is_liansuo"].ToString().ToLower() == "true"))
					{
						model.is_liansuo = true;
					}
					else
					{
						model.is_liansuo = false;
					}
				}
				if (row["kefang_zongshu"] != null && row["kefang_zongshu"].ToString() != "")
				{
					model.kefang_zongshu = int.Parse(row["kefang_zongshu"].ToString());
				}
				if (row["chuangwei_zongshu"] != null && row["chuangwei_zongshu"].ToString() != "")
				{
					model.chuangwei_zongshu = int.Parse(row["chuangwei_zongshu"].ToString());
				}
				if (row["dachuang_fangjian_shuliang"] != null && row["dachuang_fangjian_shuliang"].ToString() != "")
				{
					model.dachuang_fangjian_shuliang = int.Parse(row["dachuang_fangjian_shuliang"].ToString());
				}
				if (row["dachuang_chuangwei_shuliang"] != null && row["dachuang_chuangwei_shuliang"].ToString() != "")
				{
					model.dachuang_chuangwei_shuliang = int.Parse(row["dachuang_chuangwei_shuliang"].ToString());
				}
				if (row["shuangbiao_fangjian_shuliang"] != null && row["shuangbiao_fangjian_shuliang"].ToString() != "")
				{
					model.shuangbiao_fangjian_shuliang = int.Parse(row["shuangbiao_fangjian_shuliang"].ToString());
				}
				if (row["shuangbiao_chuangwei_shuliang"] != null && row["shuangbiao_chuangwei_shuliang"].ToString() != "")
				{
					model.shuangbiao_chuangwei_shuliang = int.Parse(row["shuangbiao_chuangwei_shuliang"].ToString());
				}
				if (row["taofang_fangjian_shuliang"] != null && row["taofang_fangjian_shuliang"].ToString() != "")
				{
					model.taofang_fangjian_shuliang = int.Parse(row["taofang_fangjian_shuliang"].ToString());
				}
				if (row["taofang_chuangwei_shuliang"] != null && row["taofang_chuangwei_shuliang"].ToString() != "")
				{
					model.taofang_chuangwei_shuliang = int.Parse(row["taofang_chuangwei_shuliang"].ToString());
				}
				if (row["wuzhangai_fangjian_shuliang"] != null && row["wuzhangai_fangjian_shuliang"].ToString() != "")
				{
					model.wuzhangai_fangjian_shuliang = int.Parse(row["wuzhangai_fangjian_shuliang"].ToString());
				}
				if (row["wuzhangai_chuangwei_shuliang"] != null && row["wuzhangai_chuangwei_shuliang"].ToString() != "")
				{
					model.wuzhangai_chuangwei_shuliang = int.Parse(row["wuzhangai_chuangwei_shuliang"].ToString());
				}
				if (row["huiyishi_json"] != null)
				{
					model.huiyishi_json = row["huiyishi_json"].ToString();
				}
				if (row["canting_json"] != null)
				{
					model.canting_json = row["canting_json"].ToString();
				}
				if (row["guanfang_wangzhan"] != null)
				{
					model.guanfang_wangzhan = row["guanfang_wangzhan"].ToString();
				}
				if (row["dianzi_youxiang"] != null)
				{
					model.dianzi_youxiang = row["dianzi_youxiang"].ToString();
				}
				if (row["dianhua"] != null)
				{
					model.dianhua = row["dianhua"].ToString();
				}
				if (row["chuanzhen"] != null)
				{
					model.chuanzhen = row["chuanzhen"].ToString();
				}
				if (row["danwei_fuzeren"] != null)
				{
					model.danwei_fuzeren = row["danwei_fuzeren"].ToString();
				}
				if (row["danwei_fuzeren_dianhua"] != null)
				{
					model.danwei_fuzeren_dianhua = row["danwei_fuzeren_dianhua"].ToString();
				}
				if (row["guanlifang"] != null)
				{
					model.guanlifang = row["guanlifang"].ToString();
				}
				if (row["guanlifang_lianxiren"] != null)
				{
					model.guanlifang_lianxiren = row["guanlifang_lianxiren"].ToString();
				}
				if (row["guanlifang_dianhua"] != null)
				{
					model.guanlifang_dianhua = row["guanlifang_dianhua"].ToString();
				}
				if (row["yezhufang"] != null)
				{
					model.yezhufang = row["yezhufang"].ToString();
				}
				if (row["yezhufang_lianxiren"] != null)
				{
					model.yezhufang_lianxiren = row["yezhufang_lianxiren"].ToString();
				}
				if (row["yezhufang_dianhua"] != null)
				{
					model.yezhufang_dianhua = row["yezhufang_dianhua"].ToString();
				}
				if (row["tese_jieshao"] != null)
				{
					model.tese_jieshao = row["tese_jieshao"].ToString();
				}
				if (row["zongtouzi_e"] != null && row["zongtouzi_e"].ToString() != "")
				{
					model.zongtouzi_e = decimal.Parse(row["zongtouzi_e"].ToString());
				}
				if (row["yongdi_mianji"] != null && row["yongdi_mianji"].ToString() != "")
				{
					model.yongdi_mianji = decimal.Parse(row["yongdi_mianji"].ToString());
				}
				if (row["zhandi_mianji"] != null && row["zhandi_mianji"].ToString() != "")
				{
					model.zhandi_mianji = decimal.Parse(row["zhandi_mianji"].ToString());
				}
				if (row["jianzhu_mianji"] != null && row["jianzhu_mianji"].ToString() != "")
				{
					model.jianzhu_mianji = decimal.Parse(row["jianzhu_mianji"].ToString());
				}
				if (row["aid"] != null && row["aid"].ToString() != "")
				{
					model.aid = int.Parse(row["aid"].ToString());
				}
				if (row["shenhe_zhuangtai"] != null && row["shenhe_zhuangtai"].ToString() != "")
				{
					model.shenhe_zhuangtai = int.Parse(row["shenhe_zhuangtai"].ToString());
				}
				if (row["shenhe_jujue_shuoming"] != null)
				{
					model.shenhe_jujue_shuoming = row["shenhe_jujue_shuoming"].ToString();
				}
				if (row["yingye_zhuangtai"] != null && row["yingye_zhuangtai"].ToString() != "")
				{
					model.yingye_zhuangtai = int.Parse(row["yingye_zhuangtai"].ToString());
				}
				if (row["yingye_zhuangtai_shuoming"] != null)
				{
					model.yingye_zhuangtai_shuoming = row["yingye_zhuangtai_shuoming"].ToString();
				}
				if (row["yingye_zhuangtai_shijian"] != null && row["yingye_zhuangtai_shijian"].ToString() != "")
				{
					model.yingye_zhuangtai_shijian = DateTime.Parse(row["yingye_zhuangtai_shijian"].ToString());
				}
				if (row["img_yingye_zhizhao"] != null)
				{
					model.img_yingye_zhizhao = row["img_yingye_zhizhao"].ToString();
				}
				if (row["img_faren_shenfenzheng_zheng"] != null)
				{
					model.img_faren_shenfenzheng_zheng = row["img_faren_shenfenzheng_zheng"].ToString();
				}
				if (row["img_faren_shenfenzheng_fan"] != null)
				{
					model.img_faren_shenfenzheng_fan = row["img_faren_shenfenzheng_fan"].ToString();
				}
				if (row["img_shenqingren_sfz_zheng"] != null)
				{
					model.img_shenqingren_sfz_zheng = row["img_shenqingren_sfz_zheng"].ToString();
				}
				if (row["img_shenqingren_sfz_fan"] != null)
				{
					model.img_shenqingren_sfz_fan = row["img_shenqingren_sfz_fan"].ToString();
				}
				if (row["guid_jdyh"] != null && row["guid_jdyh"].ToString() != "")
				{
					model.guid_jdyh = row["guid_jdyh"].ToString();
				}
				if (row["shenqing_shijian"] != null && row["shenqing_shijian"].ToString() != "")
				{
					model.shenqing_shijian = DateTime.Parse(row["shenqing_shijian"].ToString());
				}
				if (row["shenhe_shijian"] != null && row["shenhe_shijian"].ToString() != "")
				{
					model.shenhe_shijian = DateTime.Parse(row["shenhe_shijian"].ToString());
				}
				if (row["img_tezhong_hangye"] != null)
				{
					model.img_tezhong_hangye = row["img_tezhong_hangye"].ToString();
				}
			}
			return model;
		}

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public static nianbao nianbaoDataRowToModel(DataRow row)
		{
			nianbao model = new nianbao();
			if (row != null)
			{
				if (row["id"] != null && row["id"].ToString() != "")
				{
					model.id = long.Parse(row["id"].ToString());
				}
				if (row["jdid"] != null && row["jdid"].ToString() != "")
				{
					model.jdid = int.Parse(row["jdid"].ToString());
				}
				if (row["liudong_zichan_xiaoji"] != null && row["liudong_zichan_xiaoji"].ToString() != "")
				{
					model.liudong_zichan_xiaoji = decimal.Parse(row["liudong_zichan_xiaoji"].ToString());
				}
				if (row["cunhuo"] != null && row["cunhuo"].ToString() != "")
				{
					model.cunhuo = decimal.Parse(row["cunhuo"].ToString());
				}
				if (row["changqi_touzi"] != null && row["changqi_touzi"].ToString() != "")
				{
					model.changqi_touzi = decimal.Parse(row["changqi_touzi"].ToString());
				}
				if (row["guding_zichan_xiaoji"] != null && row["guding_zichan_xiaoji"].ToString() != "")
				{
					model.guding_zichan_xiaoji = decimal.Parse(row["guding_zichan_xiaoji"].ToString());
				}
				if (row["guding_zichan_yuanjia"] != null && row["guding_zichan_yuanjia"].ToString() != "")
				{
					model.guding_zichan_yuanjia = decimal.Parse(row["guding_zichan_yuanjia"].ToString());
				}
				if (row["leiji_zhejiu"] != null && row["leiji_zhejiu"].ToString() != "")
				{
					model.leiji_zhejiu = decimal.Parse(row["leiji_zhejiu"].ToString());
				}
				if (row["bennian_zhejiu"] != null && row["bennian_zhejiu"].ToString() != "")
				{
					model.bennian_zhejiu = decimal.Parse(row["bennian_zhejiu"].ToString());
				}
				if (row["zichan_heji"] != null && row["zichan_heji"].ToString() != "")
				{
					model.zichan_heji = decimal.Parse(row["zichan_heji"].ToString());
				}
				if (row["fuzhai_heji"] != null && row["fuzhai_heji"].ToString() != "")
				{
					model.fuzhai_heji = decimal.Parse(row["fuzhai_heji"].ToString());
				}
				if (row["suoyouzhe_quanyi_heji"] != null && row["suoyouzhe_quanyi_heji"].ToString() != "")
				{
					model.suoyouzhe_quanyi_heji = decimal.Parse(row["suoyouzhe_quanyi_heji"].ToString());
				}
				if (row["shishou_ziben"] != null && row["shishou_ziben"].ToString() != "")
				{
					model.shishou_ziben = decimal.Parse(row["shishou_ziben"].ToString());
				}
				if (row["yingye_shouru"] != null && row["yingye_shouru"].ToString() != "")
				{
					model.yingye_shouru = decimal.Parse(row["yingye_shouru"].ToString());
				}
				if (row["kefang_shouru"] != null && row["kefang_shouru"].ToString() != "")
				{
					model.kefang_shouru = decimal.Parse(row["kefang_shouru"].ToString());
				}
				if (row["canyin_shouru"] != null && row["canyin_shouru"].ToString() != "")
				{
					model.canyin_shouru = decimal.Parse(row["canyin_shouru"].ToString());
				}
				if (row["qita_shouru"] != null && row["qita_shouru"].ToString() != "")
				{
					model.qita_shouru = decimal.Parse(row["qita_shouru"].ToString());
				}
				if (row["yingyewai_shouru"] != null && row["yingyewai_shouru"].ToString() != "")
				{
					model.yingyewai_shouru = decimal.Parse(row["yingyewai_shouru"].ToString());
				}
				if (row["qiye_daikuan"] != null && row["qiye_daikuan"].ToString() != "")
				{
					model.qiye_daikuan = decimal.Parse(row["qiye_daikuan"].ToString());
				}
				if (row["zhengfu_butie"] != null && row["zhengfu_butie"].ToString() != "")
				{
					model.zhengfu_butie = decimal.Parse(row["zhengfu_butie"].ToString());
				}
				if (row["yingye_chengben"] != null && row["yingye_chengben"].ToString() != "")
				{
					model.yingye_chengben = decimal.Parse(row["yingye_chengben"].ToString());
				}
				if (row["nenghao_chengben"] != null && row["nenghao_chengben"].ToString() != "")
				{
					model.nenghao_chengben = decimal.Parse(row["nenghao_chengben"].ToString());
				}
				if (row["yingye_feiyong"] != null && row["yingye_feiyong"].ToString() != "")
				{
					model.yingye_feiyong = decimal.Parse(row["yingye_feiyong"].ToString());
				}
				if (row["yingye_shuijin_ji_fujia"] != null && row["yingye_shuijin_ji_fujia"].ToString() != "")
				{
					model.yingye_shuijin_ji_fujia = decimal.Parse(row["yingye_shuijin_ji_fujia"].ToString());
				}
				if (row["guanli_feiyong"] != null && row["guanli_feiyong"].ToString() != "")
				{
					model.guanli_feiyong = decimal.Parse(row["guanli_feiyong"].ToString());
				}
				if (row["shuijin"] != null && row["shuijin"].ToString() != "")
				{
					model.shuijin = decimal.Parse(row["shuijin"].ToString());
				}
				if (row["chailv_feiyong"] != null && row["chailv_feiyong"].ToString() != "")
				{
					model.chailv_feiyong = decimal.Parse(row["chailv_feiyong"].ToString());
				}
				if (row["caiwu_feiyong"] != null && row["caiwu_feiyong"].ToString() != "")
				{
					model.caiwu_feiyong = decimal.Parse(row["caiwu_feiyong"].ToString());
				}
				if (row["lixi_zhichu"] != null && row["lixi_zhichu"].ToString() != "")
				{
					model.lixi_zhichu = decimal.Parse(row["lixi_zhichu"].ToString());
				}
				if (row["xiaoshou_feiyong"] != null && row["xiaoshou_feiyong"].ToString() != "")
				{
					model.xiaoshou_feiyong = decimal.Parse(row["xiaoshou_feiyong"].ToString());
				}
				if (row["gongyun_jiazhi_biandong_shouyi"] != null && row["gongyun_jiazhi_biandong_shouyi"].ToString() != "")
				{
					model.gongyun_jiazhi_biandong_shouyi = decimal.Parse(row["gongyun_jiazhi_biandong_shouyi"].ToString());
				}
				if (row["yingye_lirun"] != null && row["yingye_lirun"].ToString() != "")
				{
					model.yingye_lirun = decimal.Parse(row["yingye_lirun"].ToString());
				}
				if (row["touzi_shouyi"] != null && row["touzi_shouyi"].ToString() != "")
				{
					model.touzi_shouyi = decimal.Parse(row["touzi_shouyi"].ToString());
				}
				if (row["lirun_zonge"] != null && row["lirun_zonge"].ToString() != "")
				{
					model.lirun_zonge = decimal.Parse(row["lirun_zonge"].ToString());
				}
				if (row["suodeshui"] != null && row["suodeshui"].ToString() != "")
				{
					model.suodeshui = decimal.Parse(row["suodeshui"].ToString());
				}
				if (row["yingjiao_zengzhishui"] != null && row["yingjiao_zengzhishui"].ToString() != "")
				{
					model.yingjiao_zengzhishui = decimal.Parse(row["yingjiao_zengzhishui"].ToString());
				}
				if (row["yingfu_zhigong_xinchou"] != null && row["yingfu_zhigong_xinchou"].ToString() != "")
				{
					model.yingfu_zhigong_xinchou = decimal.Parse(row["yingfu_zhigong_xinchou"].ToString());
				}
				if (row["zhigong_jiaona_shebao"] != null && row["zhigong_jiaona_shebao"].ToString() != "")
				{
					model.zhigong_jiaona_shebao = decimal.Parse(row["zhigong_jiaona_shebao"].ToString());
				}
				if (row["zhigong_jiaona_gongjijin"] != null && row["zhigong_jiaona_gongjijin"].ToString() != "")
				{
					model.zhigong_jiaona_gongjijin = decimal.Parse(row["zhigong_jiaona_gongjijin"].ToString());
				}
				if (row["congye_nianpingjun_renshu"] != null && row["congye_nianpingjun_renshu"].ToString() != "")
				{
					model.congye_nianpingjun_renshu = decimal.Parse(row["congye_nianpingjun_renshu"].ToString());
				}
				if (row["congye_renyuan_liushilv"] != null && row["congye_renyuan_liushilv"].ToString() != "")
				{
					model.congye_renyuan_liushilv = decimal.Parse(row["congye_renyuan_liushilv"].ToString());
				}
				if (row["pingjun_chuzulv"] != null && row["pingjun_chuzulv"].ToString() != "")
				{
					model.pingjun_chuzulv = decimal.Parse(row["pingjun_chuzulv"].ToString());
				}
				if (row["shiji_chuzu_jianyeshu"] != null && row["shiji_chuzu_jianyeshu"].ToString() != "")
				{
					model.shiji_chuzu_jianyeshu = int.Parse(row["shiji_chuzu_jianyeshu"].ToString());
				}
				if (row["kegong_chuzu_jianyeshu"] != null && row["kegong_chuzu_jianyeshu"].ToString() != "")
				{
					model.kegong_chuzu_jianyeshu = int.Parse(row["kegong_chuzu_jianyeshu"].ToString());
				}
				if (row["is_qiye_kuaiji_zhunze"] != null && row["is_qiye_kuaiji_zhunze"].ToString() != "")
				{
					if ((row["is_qiye_kuaiji_zhunze"].ToString() == "1") || (row["is_qiye_kuaiji_zhunze"].ToString().ToLower() == "true"))
					{
						model.is_qiye_kuaiji_zhunze = true;
					}
					else
					{
						model.is_qiye_kuaiji_zhunze = false;
					}
				}
				if (row["qiye_kuaiji_zhunze_suishi"] != null && row["qiye_kuaiji_zhunze_suishi"].ToString() != "")
				{
					model.qiye_kuaiji_zhunze_suishi = decimal.Parse(row["qiye_kuaiji_zhunze_suishi"].ToString());
				}
				if (row["shenhe_zhuangtai"] != null && row["shenhe_zhuangtai"].ToString() != "")
				{
					model.shenhe_zhuangtai = int.Parse(row["shenhe_zhuangtai"].ToString());
				}
				if (row["shenhe_jujue_shuoming"] != null)
				{
					model.shenhe_jujue_shuoming = row["shenhe_jujue_shuoming"].ToString();
				}
				if (row["shenhe_ren"] != null)
				{
					model.shenhe_ren = row["shenhe_ren"].ToString();
				}
				if (row["shenhe_shijian"] != null && row["shenhe_shijian"].ToString() != "")
				{
					model.shenhe_shijian = DateTime.Parse(row["shenhe_shijian"].ToString());
				}
				if (row["fabu_shijian_kaishi"] != null && row["fabu_shijian_kaishi"].ToString() != "")
				{
					model.fabu_shijian_kaishi = DateTime.Parse(row["fabu_shijian_kaishi"].ToString());
				}
				if (row["fabu_shijian_jiezhi"] != null && row["fabu_shijian_jiezhi"].ToString() != "")
				{
					model.fabu_shijian_jiezhi = DateTime.Parse(row["fabu_shijian_jiezhi"].ToString());
				}
				if (row["tianbao_shijian"] != null && row["tianbao_shijian"].ToString() != "")
				{
					model.tianbao_shijian = DateTime.Parse(row["tianbao_shijian"].ToString());
				}
				if (row["baobiao_mingcheng"] != null)
				{
					model.baobiao_mingcheng = row["baobiao_mingcheng"].ToString();
				}
				if (row["bbid"] != null && row["bbid"].ToString() != "")
				{
					model.bbid = int.Parse(row["bbid"].ToString());
				}
				if (row["tianbiao_ren"] != null)
				{
					model.tianbiao_ren = row["tianbiao_ren"].ToString();
				}
				if (row["tianbiao_ren_dianhua"] != null)
				{
					model.tianbiao_ren_dianhua = row["tianbiao_ren_dianhua"].ToString();
				}
				if (row["has_zanting"] != null && row["has_zanting"].ToString() != "")
				{
					if ((row["has_zanting"].ToString() == "1") || (row["has_zanting"].ToString().ToLower() == "true"))
					{
						model.has_zanting = true;
					}
					else
					{
						model.has_zanting = false;
					}
				}
				if (row["zanting_shuoming"] != null)
				{
					model.zanting_shuoming = row["zanting_shuoming"].ToString();
				}
				if (row["yyjdid"] != null && row["yyjdid"].ToString() != "")
				{
					model.yyjdid = int.Parse(row["yyjdid"].ToString());
				}
				if (row["yywltid"] != null && row["yywltid"].ToString() != "")
				{
					model.yywltid = int.Parse(row["yywltid"].ToString());
				}
				if (row["bb_riqi"] != null && row["bb_riqi"].ToString() != "")
				{
					model.bb_riqi = DateTime.Parse(row["bb_riqi"].ToString());
				}
			}
			return model;
		}

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public static t_area t_areaDataRowToModel(DataRow row)
		{
			t_area model = new t_area();
			if (row != null)
			{
				if (row["areaId"] != null && row["areaId"].ToString() != "")
				{
					model.areaId = int.Parse(row["areaId"].ToString());
				}
				if (row["areaCode"] != null)
				{
					model.areaCode = row["areaCode"].ToString();
				}
				if (row["areaName"] != null)
				{
					model.areaName = row["areaName"].ToString();
				}
				if (row["level"] != null && row["level"].ToString() != "")
				{
					model.level = int.Parse(row["level"].ToString());
				}
				if (row["cityCode"] != null)
				{
					model.cityCode = row["cityCode"].ToString();
				}
				if (row["center"] != null)
				{
					model.center = row["center"].ToString();
				}
				if (row["parentId"] != null && row["parentId"].ToString() != "")
				{
					model.parentId = int.Parse(row["parentId"].ToString());
				}
			}
			return model;
		}

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public static yonghu_jiudian yonghu_jiudianDataRowToModel(DataRow row)
		{
			yonghu_jiudian model = new yonghu_jiudian();
			if (row != null)
			{
				if (row["id"] != null && row["id"].ToString() != "")
				{
					model.id = int.Parse(row["id"].ToString());
				}
				if (row["zhanghao"] != null)
				{
					model.zhanghao = row["zhanghao"].ToString();
				}
				if (row["zhuangtai"] != null && row["zhuangtai"].ToString() != "")
				{
					model.zhuangtai = int.Parse(row["zhuangtai"].ToString());
				}
				if (row["jdid_json"] != null)
				{
					model.jdid_json = row["jdid_json"].ToString();
				}
				if (row["leixing"] != null && row["leixing"].ToString() != "")
				{
					model.leixing = int.Parse(row["leixing"].ToString());
				}
				if (row["xingming"] != null)
				{
					model.xingming = row["xingming"].ToString();
				}
				if (row["guid_jdyh"] != null)
				{
					model.guid_jdyh = row["guid_jdyh"].ToString();
				}
				if (row["mother_id"] != null && row["mother_id"].ToString() != "")
				{
					model.mother_id = int.Parse(row["mother_id"].ToString());
				}
			}
			return model;
		}

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public static yonghu_wenlvting yonghu_wenlvtingDataRowToModel(DataRow row)
		{
			yonghu_wenlvting model = new yonghu_wenlvting();
			if (row != null)
			{
				if (row["id"] != null && row["id"].ToString() != "")
				{
					model.id = int.Parse(row["id"].ToString());
				}
				if (row["zhanghao"] != null)
				{
					model.zhanghao = row["zhanghao"].ToString();
				}
				if (row["zhuangtai"] != null && row["zhuangtai"].ToString() != "")
				{
					model.zhuangtai = int.Parse(row["zhuangtai"].ToString());
				}
				if (row["leixing"] != null && row["leixing"].ToString() != "")
				{
					model.leixing = int.Parse(row["leixing"].ToString());
				}
				if (row["aid_json"] != null)
				{
					model.aid_json = row["aid_json"].ToString();
				}
				if (row["xingming"] != null)
				{
					model.xingming = row["xingming"].ToString();
				}
				if (row["quanxian"] != null && row["quanxian"].ToString() != "")
				{
					model.quanxian = int.Parse(row["quanxian"].ToString());
				}
			}
			return model;
		}

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public static yuebao yuebaoDataRowToModel(DataRow row)
		{
			yuebao model = new yuebao();
			if (row != null)
			{
				if (row["id"] != null && row["id"].ToString() != "")
				{
					model.id = long.Parse(row["id"].ToString());
				}
				if (row["jdid"] != null && row["jdid"].ToString() != "")
				{
					model.jdid = int.Parse(row["jdid"].ToString());
				}
				if (row["jiedai_renshu_jingnei"] != null && row["jiedai_renshu_jingnei"].ToString() != "")
				{
					model.jiedai_renshu_jingnei = int.Parse(row["jiedai_renshu_jingnei"].ToString());
				}
				if (row["jiedai_renshu_jingwai"] != null && row["jiedai_renshu_jingwai"].ToString() != "")
				{
					model.jiedai_renshu_jingwai = int.Parse(row["jiedai_renshu_jingwai"].ToString());
				}
				if (row["keyuan_qingkuang_json"] != null)
				{
					model.keyuan_qingkuang_json = row["keyuan_qingkuang_json"].ToString();
				}
				if (row["pingjun_zhusu_tianshu"] != null && row["pingjun_zhusu_tianshu"].ToString() != "")
				{
					model.pingjun_zhusu_tianshu = decimal.Parse(row["pingjun_zhusu_tianshu"].ToString());
				}
				if (row["dachuang_fangjia"] != null && row["dachuang_fangjia"].ToString() != "")
				{
					model.dachuang_fangjia = decimal.Parse(row["dachuang_fangjia"].ToString());
				}
				if (row["shuangbiao_fangjia"] != null && row["shuangbiao_fangjia"].ToString() != "")
				{
					model.shuangbiao_fangjia = decimal.Parse(row["shuangbiao_fangjia"].ToString());
				}
				if (row["taofang_fangjia"] != null && row["taofang_fangjia"].ToString() != "")
				{
					model.taofang_fangjia = decimal.Parse(row["taofang_fangjia"].ToString());
				}
				if (row["wuzhangai_fangjia"] != null && row["wuzhangai_fangjia"].ToString() != "")
				{
					model.wuzhangai_fangjia = decimal.Parse(row["wuzhangai_fangjia"].ToString());
				}
				if (row["pingjun_fangjia"] != null && row["pingjun_fangjia"].ToString() != "")
				{
					model.pingjun_fangjia = decimal.Parse(row["pingjun_fangjia"].ToString());
				}
				if (row["fangjian_shouyi"] != null && row["fangjian_shouyi"].ToString() != "")
				{
					model.fangjian_shouyi = decimal.Parse(row["fangjian_shouyi"].ToString());
				}
				if (row["kegong_chuzu_fangshu"] != null && row["kegong_chuzu_fangshu"].ToString() != "")
				{
					model.kegong_chuzu_fangshu = int.Parse(row["kegong_chuzu_fangshu"].ToString());
				}
				if (row["kegong_chuzu_jianyeshu"] != null && row["kegong_chuzu_jianyeshu"].ToString() != "")
				{
					model.kegong_chuzu_jianyeshu = int.Parse(row["kegong_chuzu_jianyeshu"].ToString());
				}
				if (row["shiji_chuzu_jianyeshu"] != null && row["shiji_chuzu_jianyeshu"].ToString() != "")
				{
					model.shiji_chuzu_jianyeshu = int.Parse(row["shiji_chuzu_jianyeshu"].ToString());
				}
				if (row["yingye_shouru"] != null && row["yingye_shouru"].ToString() != "")
				{
					model.yingye_shouru = decimal.Parse(row["yingye_shouru"].ToString());
				}
				if (row["kefang_shouru"] != null && row["kefang_shouru"].ToString() != "")
				{
					model.kefang_shouru = decimal.Parse(row["kefang_shouru"].ToString());
				}
				if (row["canyin_shouru"] != null && row["canyin_shouru"].ToString() != "")
				{
					model.canyin_shouru = decimal.Parse(row["canyin_shouru"].ToString());
				}
				if (row["qita_shouru"] != null && row["qita_shouru"].ToString() != "")
				{
					model.qita_shouru = decimal.Parse(row["qita_shouru"].ToString());
				}
				if (row["zhigong_renshu"] != null && row["zhigong_renshu"].ToString() != "")
				{
					model.zhigong_renshu = int.Parse(row["zhigong_renshu"].ToString());
				}
				if (row["dazhuan_zhigong_renshu"] != null && row["dazhuan_zhigong_renshu"].ToString() != "")
				{
					model.dazhuan_zhigong_renshu = int.Parse(row["dazhuan_zhigong_renshu"].ToString());
				}
				if (row["benke_zhigong_renshu"] != null && row["benke_zhigong_renshu"].ToString() != "")
				{
					model.benke_zhigong_renshu = int.Parse(row["benke_zhigong_renshu"].ToString());
				}
				if (row["shuoshi_zhigong_renshu"] != null && row["shuoshi_zhigong_renshu"].ToString() != "")
				{
					model.shuoshi_zhigong_renshu = int.Parse(row["shuoshi_zhigong_renshu"].ToString());
				}
				if (row["boshi_zhigong_renshu"] != null && row["boshi_zhigong_renshu"].ToString() != "")
				{
					model.boshi_zhigong_renshu = int.Parse(row["boshi_zhigong_renshu"].ToString());
				}
				if (row["nanxing_zhigong_renshu"] != null && row["nanxing_zhigong_renshu"].ToString() != "")
				{
					model.nanxing_zhigong_renshu = int.Parse(row["nanxing_zhigong_renshu"].ToString());
				}
				if (row["nvxing_zhigong_renshu"] != null && row["nvxing_zhigong_renshu"].ToString() != "")
				{
					model.nvxing_zhigong_renshu = int.Parse(row["nvxing_zhigong_renshu"].ToString());
				}
				if (row["xianshang_yuding_shu"] != null && row["xianshang_yuding_shu"].ToString() != "")
				{
					model.xianshang_yuding_shu = int.Parse(row["xianshang_yuding_shu"].ToString());
				}
				if (row["xianxia_yuding_shu"] != null && row["xianxia_yuding_shu"].ToString() != "")
				{
					model.xianxia_yuding_shu = int.Parse(row["xianxia_yuding_shu"].ToString());
				}
				if (row["tongjituan_zaijian_json"] != null)
				{
					model.tongjituan_zaijian_json = row["tongjituan_zaijian_json"].ToString();
				}
				if (row["tongjituan_nijian_json"] != null)
				{
					model.tongjituan_nijian_json = row["tongjituan_nijian_json"].ToString();
				}
				if (row["shenhe_zhuangtai"] != null && row["shenhe_zhuangtai"].ToString() != "")
				{
					model.shenhe_zhuangtai = int.Parse(row["shenhe_zhuangtai"].ToString());
				}
				if (row["shenhe_jujue_shuoming"] != null)
				{
					model.shenhe_jujue_shuoming = row["shenhe_jujue_shuoming"].ToString();
				}
				if (row["shenhe_ren"] != null)
				{
					model.shenhe_ren = row["shenhe_ren"].ToString();
				}
				if (row["shenhe_shijian"] != null && row["shenhe_shijian"].ToString() != "")
				{
					model.shenhe_shijian = DateTime.Parse(row["shenhe_shijian"].ToString());
				}
				if (row["fabu_shijian_kaishi"] != null && row["fabu_shijian_kaishi"].ToString() != "")
				{
					model.fabu_shijian_kaishi = DateTime.Parse(row["fabu_shijian_kaishi"].ToString());
				}
				if (row["fabu_shijian_jiezhi"] != null && row["fabu_shijian_jiezhi"].ToString() != "")
				{
					model.fabu_shijian_jiezhi = DateTime.Parse(row["fabu_shijian_jiezhi"].ToString());
				}
				if (row["tianbao_shijian"] != null && row["tianbao_shijian"].ToString() != "")
				{
					model.tianbao_shijian = DateTime.Parse(row["tianbao_shijian"].ToString());
				}
				if (row["baobiao_mingcheng"] != null)
				{
					model.baobiao_mingcheng = row["baobiao_mingcheng"].ToString();
				}
				if (row["bbid"] != null && row["bbid"].ToString() != "")
				{
					model.bbid = int.Parse(row["bbid"].ToString());
				}
				if (row["tianbiao_ren"] != null)
				{
					model.tianbiao_ren = row["tianbiao_ren"].ToString();
				}
				if (row["tianbiao_ren_dianhua"] != null)
				{
					model.tianbiao_ren_dianhua = row["tianbiao_ren_dianhua"].ToString();
				}
				if (row["has_zanting"] != null && row["has_zanting"].ToString() != "")
				{
					if ((row["has_zanting"].ToString() == "1") || (row["has_zanting"].ToString().ToLower() == "true"))
					{
						model.has_zanting = true;
					}
					else
					{
						model.has_zanting = false;
					}
				}
				if (row["zanting_shuoming"] != null)
				{
					model.zanting_shuoming = row["zanting_shuoming"].ToString();
				}
				if (row["yyjdid"] != null && row["yyjdid"].ToString() != "")
				{
					model.yyjdid = int.Parse(row["yyjdid"].ToString());
				}
				if (row["yywltid"] != null && row["yywltid"].ToString() != "")
				{
					model.yywltid = int.Parse(row["yywltid"].ToString());
				}
				if (row["bb_riqi"] != null && row["bb_riqi"].ToString() != "")
				{
					model.bb_riqi = DateTime.Parse(row["bb_riqi"].ToString());
				}
			}
			return model;
		}





	}
}